<%@ page language="java"
         import="com.ruohi.manage.DBType,com.ruohi.manage.PoolManager,com.ruohi.manage.Tools,com.ruohi.util.common.CommonString,com.ruohi.util.dbutil.DBHelper"
         pageEncoding="UTF-8" %>
<%@ page import="java.sql.Connection" %>
<%@ page import="java.util.Arrays" %>
<%@ page import="java.util.List" %>
<%@ page import="java.util.Map" %>
<%
	String event = CommonString.getFormatPara(request.getParameter("eventBefore"));
	String [] eventArr = event.split(",");
	List<String> eventList =Arrays.asList(eventArr);
	DBHelper dbHelper = DBHelper.getInstance();
	Connection connection = null;  
	Map model = null;
	try{
		//删除供求图片
		if(eventList.contains("delImages")){
			String ids = CommonString.getFormatPara(request.getParameter("del_id"));
			if (null != ids && ids.length() > 0) {// 删除图片
				Connection conn_market = null;
				try{
					conn_market = PoolManager.getConnection(DBType.WEB21MARKET);
					String imgSql = "select img1 from sell_buy_market where uuid in (" + ids + ") and img1 is not null and img1<>'' ";
					List<Map> ml = dbHelper.getMapList(imgSql, conn_market);
					if(ml!=null && ml.size()>0){
                        String rs = Tools.doImagesPost("http://img.52sdskj.com/delete_files.jsp", ml);
					}
				}catch(Exception e){
					e.printStackTrace();
				}finally{
					DBHelper.freeConnection(conn_market);

				}
			}
		}
		
	}catch(Exception e){
		e.printStackTrace();
	}finally{
		DBHelper.freeConnection(connection);
	}
%>